package com
{
	public class SuperBase
	{
		private var _nameHash :Object;
		private var _superSubBaseList :Object;
		
		public function SuperBase()
		{
			_nameHash = {};
			_superSubBaseList = {};
		}
		
		protected function createObjectBase(classDefinition :Class, className:String, view:View, ctrl:Controller, data:Data) : Object
		{
			var hashName :String = this._nameHash[className];
			if (hashName == null)
			{
				hashName = className.replace(/^\[class /, "");
				hashName = hashName.substring(0, 1).toLowerCase() + hashName.substring(1);
				_nameHash[className] = hashName;
			}
			if (_superSubBaseList[hashName] == null)
			{
				_superSubBaseList[hashName] = new classDefinition;
				(_superSubBaseList[hashName] as SuperSubBase).settle(hashName, view, ctrl, data, this);
			}
			return _superSubBaseList[hashName];
		}
	}
}